/*

module: msglib.c

purpose: library of error functions

reference: Stevens, Unix network programming (2ed), p.922

*/
///////////////////////////////////////////////////////////////////////////


#include <stdio.h>
#include <stdlib.h> /* exit() */
#include <syslog.h>
#include <string.h>
#include "msglib.h"

#define MAXLINE 4095

static void info_doit (const char *fmt, va_list ap)
{
	char buf[MAXLINE+1];

	vsnprintf (buf, MAXLINE, fmt, ap);
	strcat (buf, "\n");
	fputs (buf, stdout);
	fflush (stdout);

}


void send_msg (const char *fmt, ...)
{
	va_list ap;

	va_start (ap, fmt);
	info_doit (fmt, ap);
	va_end (ap);
	return;
}
